<!-- BEGIN PAGE HEADER-->
<?php $this->load->view('partials/breadcrumb.tpl')?>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<script type="text/javascript">
function defConfirm(url){
	if(!confirm("确定要删除吗？")){
		return false;
	}
	window.location.href = url;
	return true;
}

$(document).ready(function(){
	$("#reset").click(function(){
		$("select").val('');
		$("input[type='text']").val('');
	});
});
</script>
<div class="row">
	<div class="col-xs-12">
		<!-- Begin: life time stats -->
		<div class="portlet">
			<?=form_open('', Array('class'=>'form-inline', 'role'=>'form'))?>
				<?=search_form_input('name',filterValue('code'),'组员名称', 'class="form-control input-medium"');?>
            <?=search_form_dropdown('forbidden',array(''=>'选择状态...')+MShop::getMState(),filterValue('forbidden'),'状态', 'class="form-control input-medium"');?>
            <?php if ($this->_user->role_id == 1): ?>
            <?=search_form_dropdown('group_id',array(''=>'选择所属组...')+$allAdminGroups,filterValue('group_id'),'所属组', 'class="form-control input-medium"');?>
            <?php endif; ?>
				<button type="button" class="btn default" id="reset">重置条件</button>
				<button type="submit" class="btn green about_search">搜索 <i class="fa fa-search"></i></button>
			<?=form_close()?>
			<div class="portlet-body">
				<div class="row">
					<div class="col-xs-12">
						<div class="table-scrollable">
							<table class="table table-hover table-bordered table-striped">
								<thead>
									<tr>
										<th>ID</th>
										<th>组员账号</th>
										<th>组员QQ</th>
										<th>所属组</th>
										<th>组员介绍</th>
										<th>状态</th>
										<th>创建时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
								<?php foreach($list as $v){?>
									<tr>
										<td><?=$v->id?></td>
										<td>
										<?php if($p->edit){?>
											<a href="<?=site_url($thisModule.$thisController.'/edit/'.$v->id)?>"><?=htmlspecialchars($v->account)?></a>
										<?php }else{?>
											<?=htmlspecialchars($v->account)?>
										<?php }?>
										</td>
										<td><?=$v->qq;?></td>
										<td><?=$v->p_name?></td>
										<td><?=$v->introduction;?></td>
										<td><?=MShop::getMState($v->forbidden);?></td>
										<td><?=date('Y-m-d H:i:s',$v->create_time)?></td>
										<td>
											<a href="<?=site_url($thisModule.$thisController.'/edit/'.$v->id)?>" class="btn purple <?=$p->edit?'':'disabled' ?>" ><i class="fa fa-edit"></i> 编辑</a>
											<?php if($p->delete){?>
											<a class="black hide" href="javascript:void(defConfirm('<?=site_url($thisModule.$thisController.'/delete/'.$v->id.'/'.$v->update_time) ?>'));"><i class="fa fa-trash-o"></i> <?=l('delete')?></a>
											<?php }?>
										</td>
									</tr>
								<?php }?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12 text-right">
						<?=$pagination?>
					</div>
				</div>
			</div>
		</div>
		<!-- End: life time stats -->
	</div>
</div>
<!-- END PAGE CONTENT-->